* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #00f7ff;
    --secondary-color: #0066ff;
    --accent-color: #ff00ff;
    --bg-color: #0a0a1a;
    --card-bg: rgba(16, 16, 32, 0.8);
    --border-glow: 0 0 10px var(--primary-color);
}

html, body {
    height: 90vh;
    width: 100vw;
    overflow: hidden;
    background: var(--bg-color);
    font-family: 'Orbitron', sans-serif;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    padding: 20px;
    gap: 20px;
    background: linear-gradient(135deg, rgba(10, 10, 26, 0.9), rgba(20, 20, 40, 0.9));
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 1px solid var(--primary-color);
    box-shadow: var(--border-glow);
}

.player-area, .opponent-area {
    border: 2px solid var(--primary-color);
    padding: 15px;
    border-radius: 10px;
    flex: 1;
    position: relative;
    overflow: hidden;
    box-shadow: var(--border-glow);
}

.player-area::before, .opponent-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(90deg, transparent 0%, rgba(0, 247, 255, 0.1) 50%, transparent 100%),
        repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(0, 247, 255, 0.1) 10px, rgba(0, 247, 255, 0.1) 20px);
    pointer-events: none;
    animation: scan 3s linear infinite;
}

.opponent-area {
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.1), rgba(0, 102, 255, 0.1));
}

.player-area {
    background: linear-gradient(135deg, rgba(0, 247, 255, 0.1), rgba(0, 102, 255, 0.1));
}

.main-panel {
    display: flex;
    gap: 20px;
    flex: 1;
    margin-top: 10px;
}

.left-panel {
    flex: 3;
    display: flex;
    flex-direction: column;
}

.right-panel {
    flex: 2;
    border-left: 2px dashed var(--primary-color);
    padding-left: 20px;
    position: relative;
}

.right-panel::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-color);
    box-shadow: var(--border-glow);
}

.hand {
    display: flex;
    gap: 10px;
    margin: 10px 0;
    flex-wrap: wrap;
    min-height: 150px;
    align-items: center;
    border: 1px dashed var(--primary-color);
    padding: 10px;
    background: var(--card-bg);
    box-shadow: var(--border-glow);
}

.hand:empty::before {
    content: "暂无手牌";
    color: var(--primary-color);
    font-size: 14px;
    width: 100%;
    text-align: center;
    text-shadow: 0 0 5px var(--primary-color);
}

.cards {
    display: flex;
    gap: 10px;
    margin: 10px 0;
    flex-wrap: wrap;
}

.card {
    width: 100px;
    height: 140px;
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    cursor: pointer;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    position: relative;
    margin: 5px;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: var(--border-glow);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 20px var(--primary-color);
}

.info-panel {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: var(--primary-color);
    text-shadow: 0 0 5px var(--primary-color);
    font-size: 1.2em;
}

.controls {
    display: flex;
    gap: 10px;
    margin: 10px 0;
}

button {
    padding: 8px 20px;
    cursor: pointer;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border: none;
    color: white;
    border-radius: 5px;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px var(--primary-color);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px var(--primary-color);
}

.battle-area {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    min-height: 160px;
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    padding: 10px;
    margin-top: 10px;
    background: var(--card-bg);
    box-shadow: var(--border-glow);
    position: relative;
    overflow: hidden;
}

.battle-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(90deg, transparent 0%, rgba(0, 247, 255, 0.1) 50%, transparent 100%),
        repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(0, 247, 255, 0.1) 10px, rgba(0, 247, 255, 0.1) 20px);
    pointer-events: none;
    animation: scan 3s linear infinite;
}

.timer {
    text-align: center;
    margin-top: 10px;
    font-weight: bold;
    color: var(--primary-color);
    text-shadow: 0 0 5px var(--primary-color);
    font-size: 1.2em;
}

.bond-panel {
    min-height: 28px;
    margin: 8px 0 4px 0;
    font-size: 16px;
    color: var(--accent-color);
    font-weight: bold;
    letter-spacing: 2px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    text-shadow: 0 0 5px var(--accent-color);
}

.bond-item {
    background: rgba(255, 0, 255, 0.1);
    border: 1px solid var(--accent-color);
    border-radius: 5px;
    padding: 2px 10px;
    color: var(--accent-color);
    font-size: 15px;
    font-weight: bold;
    box-shadow: 0 0 10px var(--accent-color);
}

.merged-card {
    animation: glow 3s ease-in-out infinite;
    box-shadow: 0 0 20px var(--accent-color);
    transform: scale(1.05);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.merged-card::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: radial-gradient(circle, rgba(255, 0, 255, 0.3) 0%, rgba(255, 0, 255, 0) 70%);
    border-radius: 8px;
    z-index: -1;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes glow {
    0% {
        box-shadow: 0 0 10px var(--accent-color);
        transform: scale(1.05);
    }
    50% {
        box-shadow: 0 0 40px var(--accent-color);
        transform: scale(1.1);
    }
    100% {
        box-shadow: 0 0 10px var(--accent-color);
        transform: scale(1.05);
    }
}

@keyframes pulse {
    0% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
    100% {
        opacity: 0.5;
        transform: scale(1);
    }
}

@keyframes scan {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 100% 100%;
    }
}